# encoding: utf-8
from flask_marshmallow import base_fields
from app.modules.common.parameters import BaseParameters
from flask_restplus_patched import Parameters


class MachineListParameters(BaseParameters):
    id = base_fields.Integer(
        description = "实体机ID",
        required = False,
        missing = None
    )


class MachineDelParameters(BaseParameters):
    id = base_fields.Integer(
        description = "实体机ID",
        required = True,
    )


class MachineUpdateParameters(BaseParameters):
    id = base_fields.Integer(
        description = "实体机ID",
        required = True,
    )
    cpus = base_fields.String(
        description = "cpu个数",
        required = True,
    )
    ram = base_fields.String(
        description = "内存大小 g",
        required = True,
    )
    disks = base_fields.String(
        description = "硬盘个数",
        required = True,
    )


class MachineAddParameters(BaseParameters):
    ip = base_fields.String(
        description = "实体机ip",
        required = True,
    )
    cpus = base_fields.String(
        description = "cpu个数",
        required = True,
    )
    ram = base_fields.String(
        description = "内存大小 g",
        required = True,
    )
    disks = base_fields.String(
        description = "硬盘个数",
        required = True,
    )


class StartVMParameters(Parameters):
    ip = base_fields.String(
        description = "实体机ip",
        required = True
    )
